{extend name="layout/layout" /}

{block name="content"}
<blockquote class="layui-elem-quote quoteBox" style="height:16px;margin-bottom: 0;border-left:none">
    <form class="layui-form h between">
        <div class="layui-inline searchBox">
            <div class="layui-input-inline">
                默认运费模板
            </div>
        </div>
        <div class="layui-inline">
            <input type="checkbox" name="status" id="switch_default" {if $freight_model == 1}checked=""{/if} lay-skin="switch" lay-filter="switch_default" lay-text="启用|禁用"><div class="layui-unselect layui-form-switch" lay-skin="_switch"><em>启用</em><i></i></div>
        </div>
    </form>
</blockquote>
<blockquote class="layui-elem-quote quoteBox" style="border-left:none">
    <form class="layui-form h between">
        <div class="layui-form-item">
            <div class="layui-inline">
                <div class="">
                    <select name="freight_type" lay-verify="required" id="freight_type"  lay-filter="freight_type">
                        <option value="1" {if $t_type == 1}selected = "selected"{/if}>统一运费</option>
                        <option value="2" {if $t_type == 2}selected = "selected"{/if}>满额包邮</option>
                    </select>
                </div>
            </div>
            <div class="layui-inline" id="tongyi">
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="unified_price" maxlength="10" lay-verify="unified_price" value="{$unified_price}" placeholder="运费（元）" autocomplete="off">
                    
                </div>
                <div class="layui-form-mid layui-word-aux">元</div>
            </div>
            <div class="layui-inline" id="mane" style="display: none">
            	<label class="layui-form-label">订单金额>=</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="full_amount" maxlength="10" lay-verify="full_amount" value="{$full_amount}" placeholder="" autocomplete="off">
                </div>
                <label class="layui-form-mid">元时包邮　　否则运费为</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" name="s_price" value="{$s_price}" maxlength="10" lay-verify="s_price" placeholder="" autocomplete="off">
                </div>
            </div>
        </div>
        <div class="layui-inline">
            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="freightDefaultSave">保存</button>
        </div>
    </form>
</blockquote>

<blockquote class="layui-elem-quote quoteBox" style="margin:50px 0 2px 0;border-left:none">
    <form class="layui-form h between">
        <div class="layui-inline searchBox">
            <div class="layui-input-inline">
                自定义运费模板
            </div>
        </div>

        <div class="layui-inline">
            <div class="layui-inline" style="margin-right: 20px">
                <input type="checkbox" name="status" id="switch_diy" {if $freight_model == 2}checked=""{/if} lay-skin="switch" lay-filter="switch_diy" lay-text="启用|禁用"><div class="layui-unselect layui-form-switch" lay-skin="_switch"><em>启用</em><i></i></div>
            </div>
        </div>
    </form>
</blockquote>
<blockquote class="layui-elem-quote quoteBox" style="margin-bottom: 0;border-left:none">
    <form class="layui-form h between">
        <div class="layui-inline">
            <a href="javascript:;"  class="layui-btn layui-btn-normal add_btn"><i class="layui-icon"></i> 新增</a>
        </div>
    </form>
</blockquote>

<table id="dataTable" lay-filter="dataTable"></table>

<input type="hidden" class="datalist_url" value="{:url('admin/Freight/index')}">
<input type="hidden" class="add_url" value="{:url('admin/Freight/add')}">
<input type="hidden" class="edit_url" value="{:url('admin/Freight/edit')}">
<input type="hidden" class="delete_url" value="{:url('admin/memberlevel/delete')}">
<input type="hidden" class="handle_url" value="{:url('admin/'.strtolower($model).'/handle')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/admin/pages/js/freighttemplate.js" type="text/javascript"></script>
{/block}